//
//  ROHUD.swift
//  NEUFOOD
//
//  Created by gray on 2017/10/24.
//  Copyright © 2017年 gray. All rights reserved.
//

import Foundation
extension MBProgressHUD{

    class func showDelayHUDToView(_ view: UIView,message:String) -> Void{
        let HUD = MBProgressHUD(view: view)
        view.addSubview(HUD!)
        HUD?.yOffset = Float( view.frame.size.height * 1.0 / 4.0)
        
        HUD?.customView = UIImageView(frame:CGRect.zero)
        HUD?.mode = MBProgressHUDMode.customView
        HUD?.labelText = message
        HUD?.show(true)
        HUD?.hide(true, afterDelay: 1)
        
     
    }

}
